package com.campuscarbooking.api.repository;

import com.campuscarbooking.api.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface UserRepository extends JpaRepository<User, Long> {

    Optional<User> findByWxOpenid(String wxOpenid);

    boolean existsByWxOpenid(String wxOpenid);

    boolean existsByPhone(String phone);

    Optional<User> findByPhone(String phone);
} 